#include <bits/stdc++.h>
using namespace std;
struct TreeNode {
	int val;
	TreeNode *left;
	TreeNode *right;
	TreeNode() : val(0), left(nullptr), right(nullptr) {}
	TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
	TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
class Test{
public:
	void traversal(TreeNode* cur){
		if(cur == NULL){
			return;
		}
		swap(cur->left,cur->right);
		traversal(cur->left);
		traversal(cur->right);
	}
	 TreeNode* invertTree(TreeNode* root) {
		if(root == NULL){
			return root;
		}
		swap(root->left,root->right);
		invertTree(root->left);
		invertTree(root->right);
		return root;
	 }
};
class Test2{
public:
	TreeNode* invertTree(TreeNode* root){
		if(root == NULL){
			return root;
		}
		swap(root->left,root->right);
		invertTree(root->left);
		invertTree(root->right);
		return root;
	}
};

int main(){
	
	return 0;
}
